/**
 * AUTHOR: Zhou Yu <pepsior@163.com>
 *
 * COPYRIGHT(C) 2011 Zhou Yu. ALL RIGHTS RESERVED.
 */
#pragma once
#ifndef XL_TARGET_H_INCLUDED
#define XL_TARGET_H_INCLUDED

#include <xl/patch.h>

/* Target */
typedef struct xl_target
{
    wchar_t path[MAX_PATH + 1];
    xl_version_t version;
}xl_target_t;

/* Initialize target. */
int xl_target_init(xl_target_t *target, const wchar_t *path);

/* Patch target. */
int xl_target_patch(const xl_target_t *target, const xl_patch_t *patch);

/* Get the version of target. */
__inline static const xl_version_t *xl_target_get_version(const xl_target_t *target)
{
    return &target->version;
}

#endif      /* #ifndef XL_TARGET_H_INCLUDED */

